<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
       xmlns:p="http://primefaces.org/ui" >

    <ui:composition template="/menu.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateReservasTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="6">
                    <h:outputLabel value="#{bundle.CreateReservasLabel_fecha}" for="fecha" />
                    <p:calendar maxlength="12" id="fecha" value="#{reservasController.selected.fecha}" locale="de" navigator="true" pattern="MM/dd/yyyy" required="true" requiredMessage="#{bundle.CreateReservasRequiredMessage_fecha}">
                        <p:watermark for="fecha" value="mm/dd/yyyy" id="watermark8" />
                    </p:calendar>
                    <h:outputLabel value="#{bundle.CreateReservasLabel_descripcion}" for="descripcion" />
                    <h:inputText id="descripcion" value="#{reservasController.selected.descripcion}" title="#{bundle.CreateReservasTitle_descripcion}" />
                    <h:outputLabel value="#{bundle.CreateReservasLabel_maquina}" for="maquina" />
                    <h:selectOneMenu id="maquina" value="#{reservasController.selected.maquina}" title="#{bundle.CreateReservasTitle_maquina}" required="true" requiredMessage="#{bundle.CreateReservasRequiredMessage_maquina}">
                        <f:selectItems value="#{maquinasController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateReservasLabel_horasReserva}" for="horasReserva" />
                    <h:selectOneMenu id="horasReserva" value="#{reservasController.selected.horasReserva}" title="#{bundle.CreateReservasTitle_horasReserva}" required="true" requiredMessage="#{bundle.CreateReservasRequiredMessage_horasReserva}">
                        <f:selectItems value="#{horasreservaController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateReservasLabel_estadoReserva}" for="estadoReserva" />
                    <h:selectOneMenu id="estadoReserva" value="#{reservasController.selected.estadoReserva}" title="#{bundle.CreateReservasTitle_estadoReserva}" required="true" requiredMessage="#{bundle.CreateReservasRequiredMessage_estadoReserva}">
                        <f:selectItems value="#{estadosController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateReservasLabel_numdoc}" for="numdoc" />
                    <h:selectOneMenu id="numdoc" value="#{reservasController.selected.numdoc}" title="#{bundle.CreateReservasTitle_numdoc}" required="true" requiredMessage="#{bundle.CreateReservasRequiredMessage_numdoc}">
                        <f:selectItems value="#{clientesController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{reservasController.create}" value="#{bundle.CreateReservasSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{reservasController.prepareList}" value="#{bundle.CreateReservasShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.CreateReservasIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
